Changing overflow from div dynamically [closed]

Posted by user552669 on Stack Overflow See other posts from Stack Overflow or by user552669
Published on 2010-12-25T11:15:07Z Indexed on 2010/12/25 11:54 UTC
Read the original article Hit count: 176

Filed under:
|
|
|

Hello comunnity!

I am filling a div using JQuery. This div has the CSS property 'overflow' set to 'auto' (to display scrollbars because the div has a lot of HTML inside).

But the DIV doesn't display the scrollbars. I think that the problem is that I'm setting the CSS property using CSS and the DIV is filling dynamically.

How can I do to display scrollbars if the HTML inside the DIV doesn't fit, but dynamically?

I'm trying to set the property manually after fill the div, but didn't work:

function createWB(tag){
   // Fill the div

   // ...

   // Set the scrollbars
   $('.tab_content').css('overflow','auto');
}

If a set the property to 'scroll', the scrollbars appear, but disabled.

Thanks in advance! :)

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about jQuery